 

import request from '@/router/axios'

export function fetchListDict(query) {
  return request({
    url: '/support/swpmticketcardtypeparam/page',
    method: 'get',
    params: query
  })
}
export function exportExcel(query) {
  return request({
    url: '/stm/swstticketpettyadd/export',
    method: 'get',
    params: query,
    responseType: 'arraybuffer'
  })
}
export function fetchList(query) {
  return request({
    url: '/stm/swstticketpettyadd/page',
    method: 'get',
    params: query
  })
}

export function addObj(obj) {
  return request({
    url: '/stm/swstticketpettyadd',
    method: 'post',
    data: obj
  })
}

export function addcashticketObj(obj) {
  return request({
    url: '/stm/swstticketpettyadd/addcashticket',
    method: 'post',
    data: obj
  })
}

export function getObj(id) {
  return request({
    url: '/stm/swstticketpettyadd/details/' + id,
    method: 'get'
  })
}

export function delObj(id) {
  return request({
    url: '/stm/swstticketpettyadd/' + id,
    method: 'delete'
  })
}

export function putObj(obj) {
  return request({
    url: '/stm/swstticketpettyadd',
    method: 'put',
    data: obj
  })
}


export function returnObj(obj) {
  return request({
    url: '/stm/swstticketpettyadd/returncashticket',
    method: 'post',
    data: obj
  })
}


export function fetchListTiketReturn(id) {
  return request({
    url: '/stm/swstticketpettyadd/query/ticketType/'+id,
    method: 'get',
  })
}

export function delBatch(id) {
  return request({
    url: '/stm/swstticketpettyadd/batchCascadeDel' ,
    method: 'delete',
    data:id
  })
}

export function getSwStTicketPettyAdd(param) {
  return request({
    url: "/stm/swstticketpettyadd/getSwStTicketPettyAdd",
    method: "post",
    params: param
  });
}

//查看车站配票与配备用金历史记录
export function queryPastRecords(param){
  return request({
    url: '/stm/swstticketpettyadd/getLogById/'+param.id,
    method: 'get'
  })
}

//查看车站配票与配备用金历史记录明细
export function queryPastRecordsDetail(param){
  return request({
    url: '/stm/swstticketpettyadd/getLogChildById/'+param.id,
    method: 'get'
  })
}

